<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width,initial-scale=1" name="viewport"/>
  <meta content="ie=edge" http-equiv="x-ua-compatible"/>
  <meta content="Copy to clipboard" name="lang:clipboard.copy"/>
  <meta content="Copied to clipboard" name="lang:clipboard.copied"/>
  <meta content="en" name="lang:search.language"/>
  <meta content="True" name="lang:search.pipeline.stopwords"/>
  <meta content="True" name="lang:search.pipeline.trimmer"/>
  <meta content="No matching documents" name="lang:search.result.none"/>
  <meta content="1 matching document" name="lang:search.result.one"/>
  <meta content="# matching documents" name="lang:search.result.other"/>
  <meta content="[\s\-]+" name="lang:search.tokenizer"/>
  <link crossorigin="" href="https://fonts.gstatic.com/" rel="preconnect"/>
  <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500,700|Roboto:300,400,400i,700&amp;display=fallback" rel="stylesheet"/>
  <style>
   body,
      input {
        font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif
      }

      code,
      kbd,
      pre {
        font-family: "Roboto Mono", "Courier New", Courier, monospace
      }
  </style>
  <link href="../_static/stylesheets/application.css" rel="stylesheet"/>
  <link href="../_static/stylesheets/application-palette.css" rel="stylesheet"/>
  <link href="../_static/stylesheets/application-fixes.css" rel="stylesheet"/>
  <link href="../_static/fonts/material-icons.css" rel="stylesheet"/>
  <meta content="84bd00" name="theme-color"/>
  <script src="../_static/javascripts/modernizr.js">
  </script>
  <title>
   Template Class Int8Calibrator — TRTorch 0.0.2 documentation
  </title>
  <link href="../_static/material.css" rel="stylesheet" type="text/css"/>
  <link href="../_static/pygments.css" rel="stylesheet" type="text/css"/>
  <link href="../_static/collapsible-lists/css/tree_view.css" rel="stylesheet" type="text/css"/>
  <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js">
  </script>
  <script src="../_static/jquery.js">
  </script>
  <script src="../_static/underscore.js">
  </script>
  <script src="../_static/doctools.js">
  </script>
  <script src="../_static/language_data.js">
  </script>
  <script src="../_static/collapsible-lists/js/CollapsibleLists.compressed.js">
  </script>
  <script src="../_static/collapsible-lists/js/apply-collapsible-lists.js">
  </script>
  <link href="../genindex.html" rel="index" title="Index"/>
  <link href="../search.html" rel="search" title="Search"/>
  <link href="enum_logging_8h_1a5f612ff2f783ff4fbe89d168f0d817d4.html" rel="next" title="Enum Level"/>
  <link href="classtrtorch_1_1ptq_1_1Int8CacheCalibrator.html" rel="prev" title="Template Class Int8CacheCalibrator"/>
 </head>
 <body data-md-color-accent="light-green" data-md-color-primary="light-green" dir="ltr">
  <svg class="md-svg">
   <defs data-children-count="0">
    <svg height="448" id="__github" viewbox="0 0 416 448" width="416" xmlns="http://www.w3.org/2000/svg">
     <path d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z" fill="currentColor">
     </path>
    </svg>
   </defs>
  </svg>
  <input class="md-toggle" data-md-toggle="drawer" id="__drawer" type="checkbox"/>
  <input class="md-toggle" data-md-toggle="search" id="__search" type="checkbox"/>
  <label class="md-overlay" data-md-component="overlay" for="__drawer">
  </label>
  <a class="md-skip" href="#_cpp_api/classtrtorch_1_1ptq_1_1Int8Calibrator" tabindex="1">
   Skip to content
  </a>
  <header class="md-header" data-md-component="header">
   <nav class="md-header-nav md-grid">
    <div class="md-flex navheader">
     <div class="md-flex__cell md-flex__cell--shrink">
      <a class="md-header-nav__button md-logo" href="../index.html" title="TRTorch 0.0.2 documentation">
       <i class="md-icon">
        
       </i>
      </a>
     </div>
     <div class="md-flex__cell md-flex__cell--shrink">
      <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer">
      </label>
     </div>
     <div class="md-flex__cell md-flex__cell--stretch">
      <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
       <span class="md-header-nav__topic">
        TRTorch
       </span>
       <span class="md-header-nav__topic">
        Template Class Int8Calibrator
       </span>
      </div>
     </div>
     <div class="md-flex__cell md-flex__cell--shrink">
      <label class="md-icon md-icon--search md-header-nav__button" for="__search">
      </label>
      <div class="md-search" data-md-component="search" role="dialog">
       <label class="md-search__overlay" for="__search">
       </label>
       <div class="md-search__inner" role="search">
        <form action="../search.html" class="md-search__form" method="GET" name="search">
         <input autocapitalize="off" autocomplete="off" class="md-search__input" data-md-component="query" data-md-state="active" name="q" placeholder="Search" spellcheck="false" type="text"/>
         <label class="md-icon md-search__icon" for="__search">
         </label>
         <button class="md-icon md-search__icon" data-md-component="reset" tabindex="-1" type="reset">
          
         </button>
        </form>
        <div class="md-search__output">
         <div class="md-search__scrollwrap" data-md-scrollfix="">
          <div class="md-search-result" data-md-component="result">
           <div class="md-search-result__meta">
            Type to start searching
           </div>
           <ol class="md-search-result__list">
           </ol>
          </div>
         </div>
        </div>
       </div>
      </div>
     </div>
     <div class="md-flex__cell md-flex__cell--shrink">
      <div class="md-header-nav__source">
       <a class="md-source" data-md-source="github" href="https://github.com/nvidia/TRTorch/" title="Go to repository">
        <div class="md-source__icon">
         <svg height="28" viewbox="0 0 24 24" width="28" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
          <use height="24" width="24" xlink:href="#__github">
          </use>
         </svg>
        </div>
        <div class="md-source__repository">
         TRTorch
        </div>
       </a>
      </div>
     </div>
     <div class="md-flex__cell md-flex__cell--shrink dropdown">
      <button class="dropdownbutton">
       Versions
      </button>
      <div class="dropdown-content md-hero">
       <a href="https://nvidia.github.io/TRTorch/" title="master">
        master
       </a>
       <a href="https://nvidia.github.io/TRTorch/v0.0.2/" title="v0.0.2">
        v0.0.2
       </a>
       <a href="https://nvidia.github.io/TRTorch/v0.0.1/" title="v0.0.1">
        v0.0.1
       </a>
      </div>
     </div>
    </div>
   </nav>
  </header>
  <div class="md-container">
   <nav class="md-tabs" data-md-component="tabs">
    <div class="md-tabs__inner md-grid">
     <ul class="md-tabs__list">
      <li class="md-tabs__item">
       <a class="md-tabs__link" href="../index.html">
        TRTorch 0.0.2 documentation
       </a>
      </li>
      <li class="md-tabs__item">
       <a class="md-tabs__link" href="trtorch_cpp.html">
        TRTorch C++ API
       </a>
      </li>
     </ul>
    </div>
   </nav>
   <main class="md-main">
    <div class="md-main__inner md-grid" data-md-component="container">
     <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
      <div class="md-sidebar__scrollwrap">
       <div class="md-sidebar__inner">
        <nav class="md-nav md-nav--primary" data-md-level="0">
         <label class="md-nav__title md-nav__title--site" for="__drawer">
          <a class="md-nav__button md-logo" href="../index.html" title="TRTorch 0.0.2 documentation">
           <i class="md-icon">
            
           </i>
          </a>
          <a href="../index.html" title="TRTorch 0.0.2 documentation">
           TRTorch
          </a>
         </label>
         <div class="md-nav__source">
          <a class="md-source" data-md-source="github" href="https://github.com/nvidia/TRTorch/" title="Go to repository">
           <div class="md-source__icon">
            <svg height="28" viewbox="0 0 24 24" width="28" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
             <use height="24" width="24" xlink:href="#__github">
             </use>
            </svg>
           </div>
           <div class="md-source__repository">
            TRTorch
           </div>
          </a>
         </div>
         <ul class="md-nav__list">
          <li class="md-nav__item">
           <span class="md-nav__link caption">
            <span class="caption-text">
             Getting Started
            </span>
           </span>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__link" href="../tutorials/installation.html">
            Installation
           </a>
           <ul class="md-nav__list">
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/installation.html#dependencies">
              Dependencies
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/installation.html#dependencies-for-compilation">
              Dependencies for Compilation
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/installation.html#building-using-cudnn-tensorrt-tarball-distributions">
              <strong>
               Building using cuDNN &amp; TensorRT tarball distributions
              </strong>
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/installation.html#building-using-locally-installed-cudnn-tensorrt">
              <strong>
               Building using locally installed cuDNN &amp; TensorRT
              </strong>
             </a>
            </li>
           </ul>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__link" href="../tutorials/getting_started.html">
            Getting Started
           </a>
           <ul class="md-nav__list">
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/getting_started.html#creating-a-torchscript-module">
              Creating a TorchScript Module
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/getting_started.html#working-with-torchscript-in-python">
              Working with TorchScript in Python
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/getting_started.html#compiling-with-trtorch-in-python">
              Compiling with TRTorch in Python
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/getting_started.html#working-with-torchscript-in-c">
              Working with TorchScript in C++
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/getting_started.html#compiling-with-trtorch-in-c">
              Compiling with TRTorch in C++
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/getting_started.html#under-the-hood">
              Under The Hood
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/getting_started.html#working-with-unsupported-operators">
              Working with Unsupported Operators
             </a>
            </li>
           </ul>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__link" href="../tutorials/ptq.html">
            Post Training Quantization (PTQ)
           </a>
           <ul class="md-nav__list">
            <li class="md-nav__item">
             <a class="md-nav__link" href="../tutorials/ptq.html#how-to-create-your-own-ptq-application">
              How to create your own PTQ application
             </a>
            </li>
           </ul>
          </li>
          <li class="md-nav__item">
           <span class="md-nav__link caption">
            <span class="caption-text">
             Contributor Documentation
            </span>
           </span>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__link" href="../contributors/system_overview.html">
            System Overview
           </a>
           <ul class="md-nav__list">
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/system_overview.html#compiler-phases">
              Compiler Phases
             </a>
            </li>
           </ul>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__link" href="../contributors/writing_converters.html">
            Writing Converters
           </a>
           <ul class="md-nav__list">
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/writing_converters.html#background">
              Background
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/writing_converters.html#converters">
              Converters
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/writing_converters.html#converter-contract">
              Converter Contract
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/writing_converters.html#conversion-context">
              Conversion Context
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/writing_converters.html#args">
              Args
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/writing_converters.html#weights">
              Weights
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/writing_converters.html#other-advice">
              Other advice
             </a>
            </li>
           </ul>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__link" href="../contributors/useful_links.html">
            Useful Links for TRTorch Development
           </a>
           <ul class="md-nav__list">
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/useful_links.html#tensorrt-available-layers-and-expected-dimensions">
              TensorRT Available Layers and Expected Dimensions:
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/useful_links.html#tensorrt-c-documentation">
              TensorRT C++ Documentation:
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/useful_links.html#tensorrt-python-documentation-sometimes-easier-to-read">
              TensorRT Python Documentation (Sometimes easier to read):
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/useful_links.html#pytorch-functional-api">
              PyTorch Functional API:
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/useful_links.html#pytorch-native-ops">
              PyTorch native_ops:
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../contributors/useful_links.html#pytorch-ir-documentation">
              PyTorch IR Documentation:
             </a>
            </li>
           </ul>
          </li>
          <li class="md-nav__item">
           <span class="md-nav__link caption">
            <span class="caption-text">
             Python API Documenation
            </span>
           </span>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__link" href="../py_api/trtorch.html">
            trtorch
           </a>
           <ul class="md-nav__list">
            <li class="md-nav__item">
             <a class="md-nav__link" href="../py_api/trtorch.html#functions">
              Functions
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../py_api/trtorch.html#enums">
              Enums
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="../py_api/trtorch.html#submodules">
              Submodules
             </a>
            </li>
           </ul>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__link" href="../py_api/logging.html">
            trtorch.logging
           </a>
          </li>
          <li class="md-nav__item">
           <span class="md-nav__link caption">
            <span class="caption-text">
             C++ API Documenation
            </span>
           </span>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__link" href="trtorch_cpp.html">
            TRTorch C++ API
           </a>
           <ul class="md-nav__list">
            <li class="md-nav__item">
             <a class="md-nav__link" href="trtorch_cpp.html#class-hierarchy">
              Class Hierarchy
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="trtorch_cpp.html#file-hierarchy">
              File Hierarchy
             </a>
            </li>
            <li class="md-nav__item">
             <a class="md-nav__link" href="trtorch_cpp.html#full-api">
              Full API
             </a>
            </li>
           </ul>
          </li>
         </ul>
        </nav>
       </div>
      </div>
     </div>
     <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
      <div class="md-sidebar__scrollwrap">
       <div class="md-sidebar__inner">
        <nav class="md-nav md-nav--secondary">
         <label class="md-nav__title" for="__toc">
          Contents
         </label>
         <ul class="md-nav__list" data-md-scrollfix="">
          <li class="md-nav__item">
           <a class="md-nav__link" href="#cpp-api-classtrtorch-1-1ptq-1-1int8calibrator--page-root">
            Template Class Int8Calibrator
           </a>
           <nav class="md-nav">
            <ul class="md-nav__list">
             <li class="md-nav__item">
              <a class="md-nav__link" href="#inheritance-relationships">
               Inheritance Relationships
              </a>
              <nav class="md-nav">
               <ul class="md-nav__list">
                <li class="md-nav__item">
                 <a class="md-nav__link" href="#base-type">
                  Base Type
                 </a>
                </li>
               </ul>
              </nav>
             </li>
             <li class="md-nav__item">
              <a class="md-nav__link" href="#class-documentation">
               Class Documentation
              </a>
             </li>
            </ul>
           </nav>
          </li>
          <li class="md-nav__item">
           <a class="md-nav__extra_link" href="../_sources/_cpp_api/classtrtorch_1_1ptq_1_1Int8Calibrator.rst.txt">
            Show Source
           </a>
          </li>
          <li class="md-nav__item" id="searchbox">
          </li>
         </ul>
        </nav>
       </div>
      </div>
     </div>
     <div class="md-content">
      <article class="md-content__inner md-typeset" role="main">
       <span id="exhale-class-classtrtorch-1-1ptq-1-1int8calibrator">
       </span>
       <h1 id="cpp-api-classtrtorch-1-1ptq-1-1int8calibrator--page-root">
        Template Class Int8Calibrator
        <a class="headerlink" href="#cpp-api-classtrtorch-1-1ptq-1-1int8calibrator--page-root" title="Permalink to this headline">
         ¶
        </a>
       </h1>
       <ul class="simple">
        <li>
         <p>
          Defined in
          <a class="reference internal" href="file_cpp_api_include_trtorch_ptq.h.html#file-cpp-api-include-trtorch-ptq-h">
           <span class="std std-ref">
            File ptq.h
           </span>
          </a>
         </p>
        </li>
       </ul>
       <h2 id="inheritance-relationships">
        Inheritance Relationships
        <a class="headerlink" href="#inheritance-relationships" title="Permalink to this headline">
         ¶
        </a>
       </h2>
       <h3 id="base-type">
        Base Type
        <a class="headerlink" href="#base-type" title="Permalink to this headline">
         ¶
        </a>
       </h3>
       <ul class="simple">
        <li>
         <p>
          <code class="docutils literal notranslate">
           <span class="pre">
            private
           </span>
           <span class="pre">
            Algorithm
           </span>
          </code>
         </p>
        </li>
       </ul>
       <h2 id="class-documentation">
        Class Documentation
        <a class="headerlink" href="#class-documentation" title="Permalink to this headline">
         ¶
        </a>
       </h2>
       <dl class="cpp class">
        <dt id="_CPPv4I00EN7trtorch3ptq14Int8CalibratorE">
         <span id="_CPPv3I00EN7trtorch3ptq14Int8CalibratorE">
         </span>
         <span id="_CPPv2I00EN7trtorch3ptq14Int8CalibratorE">
         </span>
         template&lt;typename
         <code class="sig-name descname">
          Algorithm
         </code>
         , typename
         <code class="sig-name descname">
          DataLoaderUniquePtr
         </code>
         &gt;
         <br/>
         <span class="target" id="classtrtorch_1_1ptq_1_1Int8Calibrator">
         </span>
         <em class="property">
          class
         </em>
         <code class="sig-prename descclassname">
          trtorch::ptq
          <code class="sig-prename descclassname">
           ::
          </code>
         </code>
         <code class="sig-name descname">
          Int8Calibrator
         </code>
         :
         <em class="property">
          private
         </em>
         <a class="reference internal" href="#_CPPv4I00EN7trtorch3ptq14Int8CalibratorE" title="trtorch::ptq::Int8Calibrator::Algorithm">
          Algorithm
         </a>
         <a class="headerlink" href="#_CPPv4I00EN7trtorch3ptq14Int8CalibratorE" title="Permalink to this definition">
          ¶
         </a>
         <br/>
        </dt>
        <dd>
         <p>
          Generic
          <a class="reference internal" href="#classtrtorch_1_1ptq_1_1Int8Calibrator">
           <span class="std std-ref">
            Int8Calibrator
           </span>
          </a>
          implementation based on a specified TensorRT calibration algorithm and a LibTorch DataLoader.
         </p>
         <p>
         </p>
         <dl class="simple">
          <dt>
           <strong>
            Template Parameters
           </strong>
          </dt>
          <dd>
           <ul class="breatheparameterlist simple">
            <li>
             <p>
              <code class="docutils literal notranslate">
               <span class="pre">
                Algorithm
               </span>
              </code>
              : class nvinfer1::IInt8Calibrator (Default: nvinfer1::IInt8EntropyCalibrator2) - Algorithm to use
             </p>
            </li>
            <li>
             <p>
              <code class="docutils literal notranslate">
               <span class="pre">
                DataLoaderUniquePtr
               </span>
              </code>
              : std::unique_ptr&lt;torch::data::DataLoader&gt; - DataLoader type
             </p>
            </li>
           </ul>
          </dd>
         </dl>
         <div class="breathe-sectiondef docutils container">
          <p class="breathe-sectiondef-title rubric">
           Public Functions
          </p>
          <dl class="cpp function">
           <dt id="_CPPv4N7trtorch3ptq14Int8Calibrator14Int8CalibratorE19DataLoaderUniquePtrRKNSt6stringEb">
            <span id="_CPPv3N7trtorch3ptq14Int8Calibrator14Int8CalibratorE19DataLoaderUniquePtrRKNSt6stringEb">
            </span>
            <span id="_CPPv2N7trtorch3ptq14Int8Calibrator14Int8CalibratorE19DataLoaderUniquePtrRKNSt6stringEb">
            </span>
            <span id="trtorch::ptq::Int8Calibrator::Int8Calibrator__DataLoaderUniquePtr.ssCR.b">
            </span>
            <span class="target" id="classtrtorch_1_1ptq_1_1Int8Calibrator_1a60b512a74851c95bffee7b7a927a659c">
            </span>
            <code class="sig-name descname">
             Int8Calibrator
            </code>
            <span class="sig-paren">
             (
            </span>
            <a class="reference internal" href="#_CPPv4I00EN7trtorch3ptq14Int8CalibratorE" title="trtorch::ptq::Int8Calibrator::DataLoaderUniquePtr">
             DataLoaderUniquePtr
            </a>
            <em>
             dataloader
            </em>
            ,
            <em class="property">
             const
            </em>
            std::string &amp;
            <em>
             cache_file_path
            </em>
            , bool
            <em>
             use_cache
            </em>
            <span class="sig-paren">
             )
            </span>
            <a class="headerlink" href="#_CPPv4N7trtorch3ptq14Int8Calibrator14Int8CalibratorE19DataLoaderUniquePtrRKNSt6stringEb" title="Permalink to this definition">
             ¶
            </a>
            <br/>
           </dt>
           <dd>
            <p>
             Construct a new
             <a class="reference internal" href="#classtrtorch_1_1ptq_1_1Int8Calibrator">
              <span class="std std-ref">
               Int8Calibrator
              </span>
             </a>
             object.
            </p>
            <p>
             Using the provided DataLoader, construct a calibrator that can be used for PTQ with TRTorch
            </p>
            <p>
            </p>
            <dl class="simple">
             <dt>
              <strong>
               Parameters
              </strong>
             </dt>
             <dd>
              <ul class="breatheparameterlist simple">
               <li>
                <p>
                 <code class="docutils literal notranslate">
                  <span class="pre">
                   dataloader
                  </span>
                 </code>
                 : std::unqiue_ptr&lt;torch::data::DataLoader&gt; - A unique pointer to the DataLoader, should be what is returned from the make_data_loader factory
                </p>
               </li>
               <li>
                <p>
                 <code class="docutils literal notranslate">
                  <span class="pre">
                   cache_file_path
                  </span>
                 </code>
                 : const std::string&amp; - A path to store / find the calibration cache
                </p>
               </li>
               <li>
                <p>
                 <code class="docutils literal notranslate">
                  <span class="pre">
                   use_cache
                  </span>
                 </code>
                 : : bool - Whether to use the cache (if it exists)
                </p>
               </li>
              </ul>
             </dd>
            </dl>
           </dd>
          </dl>
          <dl class="cpp function">
           <dt id="_CPPv4NK7trtorch3ptq14Int8Calibrator12getBatchSizeEv">
            <span id="_CPPv3NK7trtorch3ptq14Int8Calibrator12getBatchSizeEv">
            </span>
            <span id="_CPPv2NK7trtorch3ptq14Int8Calibrator12getBatchSizeEv">
            </span>
            <span id="trtorch::ptq::Int8Calibrator::getBatchSizeC">
            </span>
            <span class="target" id="classtrtorch_1_1ptq_1_1Int8Calibrator_1af216f9c7b001c564837cbbeaa99af7a9">
            </span>
            int
            <code class="sig-name descname">
             getBatchSize
            </code>
            <span class="sig-paren">
             (
            </span>
            <span class="sig-paren">
             )
            </span>
            <em class="property">
             const
            </em>
            <em class="property">
             override
            </em>
            <a class="headerlink" href="#_CPPv4NK7trtorch3ptq14Int8Calibrator12getBatchSizeEv" title="Permalink to this definition">
             ¶
            </a>
            <br/>
           </dt>
           <dd>
            <p>
             Get the Batch Size for the next batch (always 1 due to issues with TRT and explicit batch)
            </p>
            <p>
            </p>
            <dl class="simple">
             <dt>
              <strong>
               Return
              </strong>
             </dt>
             <dd>
              <p>
               int
              </p>
             </dd>
            </dl>
           </dd>
          </dl>
          <dl class="cpp function">
           <dt id="_CPPv4N7trtorch3ptq14Int8Calibrator8getBatchEA_PvA_PKci">
            <span id="_CPPv3N7trtorch3ptq14Int8Calibrator8getBatchEA_PvA_PKci">
            </span>
            <span id="_CPPv2N7trtorch3ptq14Int8Calibrator8getBatchEA_PvA_PKci">
            </span>
            <span id="trtorch::ptq::Int8Calibrator::getBatch__voidPA.cCPA.i">
            </span>
            <span class="target" id="classtrtorch_1_1ptq_1_1Int8Calibrator_1a838daa6be68e8aea7d82aab10089f8b9">
            </span>
            bool
            <code class="sig-name descname">
             getBatch
            </code>
            <span class="sig-paren">
             (
            </span>
            void *
            <em>
             bindings
            </em>
            [],
            <em class="property">
             const
            </em>
            char *
            <em>
             names
            </em>
            [], int
            <em>
             nbBindings
            </em>
            <span class="sig-paren">
             )
            </span>
            <em class="property">
             override
            </em>
            <a class="headerlink" href="#_CPPv4N7trtorch3ptq14Int8Calibrator8getBatchEA_PvA_PKci" title="Permalink to this definition">
             ¶
            </a>
            <br/>
           </dt>
           <dd>
            <p>
             Get the next Batch.
            </p>
            <p>
            </p>
            <dl class="simple">
             <dt>
              <strong>
               Return
              </strong>
             </dt>
             <dd>
              <p>
               true - There is a new batch for the calibrator to consume
              </p>
             </dd>
             <dt>
              <strong>
               Return
              </strong>
             </dt>
             <dd>
              <p>
               false - There is not a new batch for the calibrator to consume
              </p>
             </dd>
             <dt>
              <strong>
               Parameters
              </strong>
             </dt>
             <dd>
              <ul class="breatheparameterlist simple">
               <li>
                <p>
                 <code class="docutils literal notranslate">
                  <span class="pre">
                   bindings
                  </span>
                 </code>
                 : void*[] - An array of binding pointers (fed in from TensorRT calibrator), these buffers should be filed with batch data for each input
                </p>
               </li>
               <li>
                <p>
                 <code class="docutils literal notranslate">
                  <span class="pre">
                   names
                  </span>
                 </code>
                 : const char*[] - Names of bindings
                </p>
               </li>
               <li>
                <p>
                 <code class="docutils literal notranslate">
                  <span class="pre">
                   nbBindings
                  </span>
                 </code>
                 : int - Number of bindings
                </p>
               </li>
              </ul>
             </dd>
            </dl>
           </dd>
          </dl>
          <dl class="cpp function">
           <dt id="_CPPv4N7trtorch3ptq14Int8Calibrator20readCalibrationCacheER6size_t">
            <span id="_CPPv3N7trtorch3ptq14Int8Calibrator20readCalibrationCacheER6size_t">
            </span>
            <span id="_CPPv2N7trtorch3ptq14Int8Calibrator20readCalibrationCacheER6size_t">
            </span>
            <span id="trtorch::ptq::Int8Calibrator::readCalibrationCache__sR">
            </span>
            <span class="target" id="classtrtorch_1_1ptq_1_1Int8Calibrator_1a94d4bb0b1d985e01075b2fca05d480a0">
            </span>
            <em class="property">
             const
            </em>
            void *
            <code class="sig-name descname">
             readCalibrationCache
            </code>
            <span class="sig-paren">
             (
            </span>
            size_t &amp;
            <em>
             length
            </em>
            <span class="sig-paren">
             )
            </span>
            <em class="property">
             override
            </em>
            <a class="headerlink" href="#_CPPv4N7trtorch3ptq14Int8Calibrator20readCalibrationCacheER6size_t" title="Permalink to this definition">
             ¶
            </a>
            <br/>
           </dt>
           <dd>
            <p>
             Read calibration cache.
            </p>
            <p>
             How to read from the calibration cache, only enabled if use_cache is set
            </p>
            <p>
            </p>
            <dl class="simple">
             <dt>
              <strong>
               Return
              </strong>
             </dt>
             <dd>
              <p>
               const void* - Pointer to cache data
              </p>
             </dd>
             <dt>
              <strong>
               Parameters
              </strong>
             </dt>
             <dd>
              <ul class="breatheparameterlist simple">
               <li>
                <p>
                 <code class="docutils literal notranslate">
                  <span class="pre">
                   length
                  </span>
                 </code>
                 :
                </p>
               </li>
              </ul>
             </dd>
            </dl>
           </dd>
          </dl>
          <dl class="cpp function">
           <dt id="_CPPv4N7trtorch3ptq14Int8Calibrator21writeCalibrationCacheEPKv6size_t">
            <span id="_CPPv3N7trtorch3ptq14Int8Calibrator21writeCalibrationCacheEPKv6size_t">
            </span>
            <span id="_CPPv2N7trtorch3ptq14Int8Calibrator21writeCalibrationCacheEPKv6size_t">
            </span>
            <span id="trtorch::ptq::Int8Calibrator::writeCalibrationCache__voidCP.s">
            </span>
            <span class="target" id="classtrtorch_1_1ptq_1_1Int8Calibrator_1ab3b55555a5e2ff2f9c3392f399103710">
            </span>
            void
            <code class="sig-name descname">
             writeCalibrationCache
            </code>
            <span class="sig-paren">
             (
            </span>
            <em class="property">
             const
            </em>
            void *
            <em>
             cache
            </em>
            , size_t
            <em>
             length
            </em>
            <span class="sig-paren">
             )
            </span>
            <em class="property">
             override
            </em>
            <a class="headerlink" href="#_CPPv4N7trtorch3ptq14Int8Calibrator21writeCalibrationCacheEPKv6size_t" title="Permalink to this definition">
             ¶
            </a>
            <br/>
           </dt>
           <dd>
            <p>
             Write calibration cache.
            </p>
            <p>
             Write a the calibration cache provided by TensorRT to a specified file
            </p>
            <p>
            </p>
            <dl class="simple">
             <dt>
              <strong>
               Parameters
              </strong>
             </dt>
             <dd>
              <ul class="breatheparameterlist simple">
               <li>
                <p>
                 <code class="docutils literal notranslate">
                  <span class="pre">
                   cache
                  </span>
                 </code>
                 : const void* - cache data
                </p>
               </li>
               <li>
                <p>
                 <code class="docutils literal notranslate">
                  <span class="pre">
                   length
                  </span>
                 </code>
                 : size_t - length of cache
                </p>
               </li>
              </ul>
             </dd>
            </dl>
           </dd>
          </dl>
          <dl class="cpp function">
           <dt id="_CPPv4N7trtorch3ptq14Int8CalibratorcvPN8nvinfer115IInt8CalibratorEEv">
            <span id="_CPPv3N7trtorch3ptq14Int8CalibratorcvPN8nvinfer115IInt8CalibratorEEv">
            </span>
            <span id="_CPPv2N7trtorch3ptq14Int8CalibratorcvPN8nvinfer115IInt8CalibratorEEv">
            </span>
            <span id="trtorch::ptq::Int8Calibrator::castto-nvinfer1::IInt8CalibratorP-operator">
            </span>
            <span class="target" id="classtrtorch_1_1ptq_1_1Int8Calibrator_1a950cf524f987b2175f54c57c84a0db7a">
            </span>
            <code class="sig-name descname">
             operator nvinfer1::IInt8Calibrator*
            </code>
            <span class="sig-paren">
             (
            </span>
            <span class="sig-paren">
             )
            </span>
            <a class="headerlink" href="#_CPPv4N7trtorch3ptq14Int8CalibratorcvPN8nvinfer115IInt8CalibratorEEv" title="Permalink to this definition">
             ¶
            </a>
            <br/>
           </dt>
           <dd>
            <p>
             operator to cast to nvinfer1::IInt8Calibrator*
            </p>
            <p>
             Convience function to convert to a IInt8Calibrator* to easily be assigned to the ptq_calibrator field in
             <a class="reference internal" href="structtrtorch_1_1ExtraInfo.html#structtrtorch_1_1ExtraInfo">
              <span class="std std-ref">
               ExtraInfo
              </span>
             </a>
            </p>
            <p>
            </p>
            <dl class="simple">
             <dt>
              <strong>
               Return
              </strong>
             </dt>
             <dd>
              <p>
               nvinfer1::IInt8Calibrator*
              </p>
             </dd>
            </dl>
           </dd>
          </dl>
         </div>
        </dd>
       </dl>
      </article>
     </div>
    </div>
   </main>
  </div>
  <footer class="md-footer">
   <div class="md-footer-nav">
    <nav class="md-footer-nav__inner md-grid">
     <a class="md-flex md-footer-nav__link md-footer-nav__link--prev" href="classtrtorch_1_1ptq_1_1Int8CacheCalibrator.html" rel="prev" title="Template Class Int8CacheCalibrator">
      <div class="md-flex__cell md-flex__cell--shrink">
       <i class="md-icon md-icon--arrow-back md-footer-nav__button">
       </i>
      </div>
      <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
       <span class="md-flex__ellipsis">
        <span class="md-footer-nav__direction">
         Previous
        </span>
        Template Class Int8CacheCalibrator
       </span>
      </div>
     </a>
     <a class="md-flex md-footer-nav__link md-footer-nav__link--next" href="enum_logging_8h_1a5f612ff2f783ff4fbe89d168f0d817d4.html" rel="next" title="Enum Level">
      <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
       <span class="md-flex__ellipsis">
        <span class="md-footer-nav__direction">
         Next
        </span>
        Enum Level
       </span>
      </div>
      <div class="md-flex__cell md-flex__cell--shrink">
       <i class="md-icon md-icon--arrow-forward md-footer-nav__button">
       </i>
      </div>
     </a>
    </nav>
   </div>
   <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
     <div class="md-footer-copyright">
      <div class="md-footer-copyright__highlight">
       © Copyright 2020, NVIDIA Corporation.
      </div>
      Created using
      <a href="http://www.sphinx-doc.org/">
       Sphinx
      </a>
      3.0.3.
             and
      <a href="https://github.com/bashtage/sphinx-material/">
       Material for
              Sphinx
      </a>
     </div>
    </div>
   </div>
  </footer>
  <script src="../_static/javascripts/application.js">
  </script>
  <script>
   app.initialize({version: "1.0.4", url: {base: ".."}})
  </script>
 </body>
</html>